package com.saydc.dao;

import java.util.ArrayList;
import java.util.List;

import org.hibernate.Session;

import com.saydc.beans.Perfil;
import com.saydc.utils.HibernateUtils;

public class BeansDAO {
	
	private static BeansDAO instance;

	public static BeansDAO getInstance(){
		if(instance == null){
			instance = new BeansDAO();
		}
		return instance;
	}

    @SuppressWarnings("unchecked")
	public List<Perfil> getAllTipoPerfiles(){
    	List<Perfil> listaPerfiles = new ArrayList<Perfil>();
    	Session session = HibernateUtils.currentSession();
    	listaPerfiles = session.createQuery("select p from Perfil p").list();
    	return listaPerfiles;
    }

}
